import 'package:flutter/material.dart';
// import 'package:flutter_svga/flutter_svga.dart';
import 'package:get/get.dart';

class Screen extends StatefulWidget {
  Screen({super.key});

  @override
  State<Screen> createState() => _QGRulePageState();
}

class _QGRulePageState extends State<Screen>
    with SingleTickerProviderStateMixin {
  // late SVGAAnimationController _controller;

  @override
  void initState() {
    super.initState();
    var cint = 0;

    // _controller = SVGAAnimationController(vsync: this);
    // SVGAParser.shared.decodeFromAssets("images/dong.svga").then((video) {
    //   _controller.videoItem = video;
    //   _controller.forward();

    //   void listener() {
    //     if (_controller.isCompleted) {
    //       print("333333");
    //       Get.offNamed('/');
    //       _controller.removeListener(listener); // 使用函数引用移除监听
    //     }
    //   }

    //   _controller.addListener(listener); // 添加监听

    // });
  }

  @override
  void dispose() {
    // _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: 375,
        // child: Center(child: SVGAImage(_controller, fit: BoxFit.cover)),
      ),
    );
  }
}
